/**
 * Copyright (C) 2018 - 2020 https://github.com/LeeYan9
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.bifrost.model.ro;

import com.bifrost.validator.group.IsAdd;
import com.bifrost.validator.group.IsUpdate;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonManagedReference;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.persistence.Column;
import javax.validation.constraints.Future;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author Lee
 * Create Class on 2018/8/13
 * @com.bifrost.model.ro
 * @wechat-mall
 */
@Data
public class PlanItemModel {

    @Null(message = "id必须为空", groups = {IsAdd.class})
    @NotNull(message = "id不能为空", groups = {IsUpdate.class})
    private Long planItemId;
    private Boolean hasLimit = Boolean.FALSE;
    private int limitQuantity;
    private int inventory;
    private int inventoryAvailable;
    @NotBlank(message = "商品规格不能为空（商城展示）")
    private String specification;
    private BigDecimal price = BigDecimal.ZERO;
    //private String description;
    @NotBlank(message = "应用设置不能为空（用户资料填写名单）")
    private String applySetting;
    @NotNull(message = "商品不能为空")
    private Long skuId;
    private List<String> headImages = new ArrayList<>();
    private List<String> descriptionImages = new ArrayList<>();
    private List<Map<String,List>> applySettingFormat;
    private Long waitTotal=0L;
    private Long hitTotal=0L;
    private String skuName;
    private Date activeStartTime;
    private Date activeEndTime;
    private Boolean isApply = Boolean.FALSE;
}
